{* Smarty *}
{include file="header.tpl"}
<script language="javascript" src='{$BASE_HOSTPATH}dr-content/tags.js'></script>

<div id="main">
	<!-- Start - 标签列表的显示 -->
	<div id="mainbar-full">
	{include file="sub-header.tpl"}

		<div id="search">
			<label for="search_input">请输入要查询的标签：</label>
			<input type="text" id="search_input" onkeyup="search_tag(this.value,'{$is_login}')"/>
		</div>
		<div id="tags">
			<!-- Start - 标签的显示 -->
			{literal}
				<style>
					th, td {
						text-align: left;
						vertical-align: middle;
						padding: 5px;
					}
				</style>
			{/literal}
			<table>
				<tr>
					<th width="100px">标签</th>
					<th width="47px">关注数</th>
					<th width="47px">问题数</th>
				</tr>
			{section name=t_ptr loop=$tags}
				<tr>
					<td><a href="/questions?tid={$tags[t_ptr].tag_id}" title="查看tag相关问题">{$tags[t_ptr].title}</a></td>
					<td>{$tags[t_ptr].marks_num}</td>
					<td>{$tags[t_ptr].question_num}</td>
					<td>
						<div class='taglisten'>
							{if $is_login}
								{if $tags[t_ptr].is_marked}
									<span><input id='tag-{$tags[t_ptr].tag_id}' class='tag-{$tags[t_ptr].tag_id}' type='button' value='取消关注' onclick="mark_tag('{$tags[t_ptr].tag_id}',value,'{$is_login}')"/></span>
								{else}
									<span><input id='tag-{$tags[t_ptr].tag_id}' class='tag-{$tags[t_ptr].tag_id}' type='button' value='关注' onclick="mark_tag('{$tags[t_ptr].tag_id}',value,'{$is_login}')"/></span>
								{/if}
							{/if}
						</div>
					</td>
				</tr>
			{/section}
			</table>
		</div>

		<div id="tags-search">
		</div>
	</div>
</div>


{include file="footer.tpl"}